﻿using ProjScan.RecordManager;
using ProjScan.RecordManager.AssetData;
using ProjScan.ScanRule.Attr;
using UnityEditor;

namespace ProjScan.ScanRule.ProjectAssets.Animation
{
    [AnimationRuleAttr]
    internal class AnimationClip_Compression : RecordRuleImp<AnimationClipAssetData, AnimationClipRecordManager>
    {
        protected override bool IsOK(AnimationClipAssetData assetData)
        {
            if (!assetData.noImporter)
            {
                return assetData.animationType == ModelImporterAnimationType.Legacy || assetData.animationCompression == ModelImporterAnimationCompression.Optimal;
            }

            return true;
        }
    }
}